package com.takeaway.dao.daolmpl;

import com.takeaway.dao.daointerface.CollectDao;
import com.takeaway.pojo.Collect;
import com.takeaway.utils.JdbcUtils;

import java.util.ArrayList;

/**
 * @author 后台赖骏
 */
public class CollectDaoImpl implements CollectDao {
    @Override
    public int insert(Collect collect) throws Exception{
        return JdbcUtils.insert(collect);
    }

    @Override
    public int delete(Class<Collect> clz, String[] checkField, Object... factor) throws Exception{
        return JdbcUtils.delete(clz,checkField,factor);
    }

    @Override
    public int update(Collect collect) throws Exception{
        return JdbcUtils.update(collect);
    }

    @Override
    public Collect selectSingle(Collect collect, String[] checkFields, Object... factor) throws Exception{
        return (Collect) JdbcUtils.selectSingle(collect,checkFields,factor);
    }

    @Override
    public ArrayList<Collect> selectMore(Class<Collect> clz, int begin, int listNum) throws Exception{
        return (ArrayList<Collect>) JdbcUtils.selectMore(clz,begin,listNum);
    }

    @Override
    public ArrayList<Collect> selectMore(Class<Collect> clz, String[] checkField, Object... factor) throws Exception{
        return (ArrayList<Collect>) JdbcUtils.selectMore(clz,checkField,factor);
    }
}
